﻿#ifndef ADDITEM_H
#define ADDITEM_H

#include <head/g_pch.h>
#include <head/db_helper.h>
#include <head/m_message.h>
#include "m_fhs.h"

namespace Ui {
class AddItem;
}

class AddItem : public QDialog
{
    Q_OBJECT

public:
    explicit AddItem(QWidget *parent, const QString &table);
    ~AddItem();

    void updateCategory();

    bool addItem(const QString &category,
                 const QString &detail,
                 const QString &addition);

private slots:
    void on_categories_currentTextChanged(const QString &text);
    void on_btn_submit_clicked();

private:
    Ui::AddItem *ui;
    QString table_;
};

#endif // ADDITEM_H
